import request from '@/utils/request'
import { uaaUrl as ourl } from '@/utils/request';

export function Logout() {
  return request({
    url: ourl()+'api-uaa/v1/oauth/logout',
    method: 'post'
  })
}
export function getmailStatus(query){
  return request({
    url: ourl()+'api-sms/v1/sysMail/sysMailListStatus',
    method: 'get',
    params: query
  })
}

export function getFormData(query){
  return request({
    url: ourl()+query.apiUrl,
    method: 'get',
    params: query.params
  })
}

// 站内信待办类型枚举
export function sysMailNeedTypeEnumMe(query){
  return request({
    url: ourl()+'api-sms/v1/sysMail/sysMailNeedTypeEnumMe',
    method: 'get',
    params: query
  })
}

// 查询待办、已办列表-分页
export function sysMailListStatus(query){
  return request({
    url: ourl()+'api-sms/v1/sysMail/sysMailListStatus',
    method: 'get',
    params: query
  })
}


// 修改未读状态
export function updateRead(query){
  return request({
    url: ourl()+'api-sms/v1/sysMail/updateRead',
    method: 'get',
    params: query
  })
}


// 查询消息状态
export function searchMsgStatus(query){
  return request({
    url: ourl()+'api-form/v1/approve/searchMsgStatus',
    method: 'get',
    params: query
  })
}


// 字典项

export function sysDictData(query){
  return request({
    url: ourl()+'api-system/v1/sysDictData/sysDictDataByCondition',
    method: 'get',
    params: query
  })
}

//处室
export function findDeptByParentId(){
  return request({
    url: ourl()+'api-system/v1/blacklist/getOfficeList',
    method: 'get',
  })
}

// 根据appId查询回调地址
export function findCallBackUrl(appId){
  return request({
    url: ourl()+'api-uaa/v1/clients/getRedirectUrlByAppId/' + appId,
    method: 'get',
  })
}
